package com.wing.res.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @version 1.1.0
 * @Author hz
 * @Date 2024-09-27 14:09
 **/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("res_pro_bom_record")
public class ResProBomRecord implements Serializable {
    /**
     * ID
     *
     */
    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(type = IdType.AUTO)
    public Long id;

    /**
     * 版本号
     *
     */
    @Version
    @JsonIgnore
    protected Long version;

    /**
     * 版本名称
     */
    private String versionName;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime createTime;

    /**
     * 创建者ID
     */
    private Long creator;

    /**
     * 创建者名称
     */
    private String creatorName;

    /**
     * 备注
     */
    protected String remark;


    /**
     * 父id
     */
    private Long taskId;

    /**
     * 版本编码
     */
    private String code;

}
